When the Prophet (a.s.) settled in Yathrib and took it as his capital